import { Component } from '@angular/core';
import { Platform, NavController ,NavParams} from 'ionic-angular';

import { approvaldetailPage } from '../approvaldetail/approvaldetail';//新闻详细页
import { PubApi } from '../../providers/pubapi';
import { Fun } from '../../providers/fun';


@Component({
    selector: 'page-supervisiondoc',
    templateUrl: 'supervisiondoc.html'
})


export class supervisiondocPage {

    items: any;
prokey:any;
fkey:any;
    constructor(public platform: Platform, public navCtrl: NavController, public pubapi: PubApi, public navParams: NavParams) {
        this.prokey=  navParams.get("prokey");
        this.fkey=  navParams.get("fkey");
       platform.ready().then(() => { });

    }


    ionViewDidEnter() {
        var that =this;
          this.pubapi.get("FormData/GetApproval?ekey="+this.prokey+"&fKey="+this.fkey+"&userKey="+Fun.getcookie("key")+"", function (res) {
            let r = res.data;
        that.items=r;
           
        })


    }
    itemSelectedNew(item) {
        this.navCtrl.push(approvaldetailPage, {
            items: item
        });


    }
}

